window.markdown_autoRender = function() {
    var converter = new showdown.Converter();
    document.body.innerHTML = document.body.innerHTML.replace(/\[md\].*?\[\/md\]/gm, function(str) {
        str = str.substring(0, str.length-5);
        str = str.substring(4, str.length);
        str = str.replace(/\[markdownNextLine\]/gm, '\n');
        return converter.makeHtml(str);
    })
}

window.onload = markdown_autoRender;
